<?php
$a = ['name' => 'HarryPotter', 8 => 'male', 'age' => 12, 'skill' => 'Magic_fly', 'Hogwarts'];

$b = ['name' => 'Hermione', 4 => 'female', '12', 'skill' => 'Magic_invisibility', 'school' => 'Hogwarts'];
$arr1 = $a + $b;
$arr2 = $b + $a;
print_r( $arr1 );
print_r( $arr2 );

var_dump( $arr1 == $arr2 );